<?php

class syslogistics_api_dlvpoint_get {

    public $apiDescription = "根据送货ID，获取单条送货点信息";

    public function getParams()
    {
        $return['params'] = array(
            'id' =>['type'=>'string','valid'=>'required', 'description'=>'送货点ID','default'=>'','example'=>'10'],
        );

        return $return;
    }

    public function get($params)
    {
        $objMdldlvpoint = app::get('syslogistics')->model('delivery_point');
        $data = $objMdldlvpoint->getRow('*', ['id'=>$params['id']]);
        $data['area_id'] = $data['area'];
        $data['area'] = area::getSelectArea($data['area'],'');
        return $data;
    }
}

